package cn.xjt.conrtoller;

import cn.xjt.dao.DataDao;
import cn.xjt.dao.RestTemplateTestCustomer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: xu
 * @Description: TODO
 * @Date: 2021/11/4 23:10
 */
@RestController
public class CustomerController
{
	@Autowired
	DataDao dataDao;

	@Autowired
	RestTemplateTestCustomer restTemplateTestCustomer;
	@GetMapping("/testFeign")
	public String getdata()
	{
		return dataDao.getData();
	}

	@GetMapping("/testRest")
	public String getDataTwo()
	{
		return restTemplateTestCustomer.getData();
	}
	@GetMapping("/a/b")
	public String testGateWay()
	{
		return "invoke successful";
	}
}
